<template>
  <div>
    <van-nav-bar
      title="意见反馈"
      left-text="返回"
      left-arrow
      @click-left="onClickLeft"
    />
    <div style="width: 100%;">
      <div>
        <div class="left">
          <van-dropdown-menu>
            <van-dropdown-item v-model="type" :options="types" />
          </van-dropdown-menu>
        </div>
        <div class="right">
          <van-field v-model="title" placeholder="请输入意见反馈标题" />
        </div>
      </div>
    </div>
    <!-- <div>
      <div class="line">
      </div>
    </div> -->
    <div>
      <van-field
        v-model="suppertContent"
        rows="6"
        autosize
        type="textarea"
        maxlength="400"
        placeholder="请输入建议反馈内容"
        show-word-limit
      />

      <div>
        <van-button
        @click="onClickCommit()"
        class="commitBtn"
        type="primary" block>提交内容</van-button>
      </div>
    </div>

  </div>
</template>

<script>
export default {
  created() {
    this.$data.role = this.$route.query.role;
  },
  data() {
    return {
      role:-1,
      title:'',
      suppertContent:'',
      type: -1,
      types: [
        { text: '类型', value: -1 },
        { text: '账号问题', value: 0 },
        { text: '功能问题', value: 1 },
        { text: '界面问题', value: 2 },
        { text: '其他问题', value: 3 },
      ],
    };
  },
  methods:{
    onClickLeft() {
      this.$router.push({path:'/home',query:{role:this.$data.role}})
    },
    onClickCommit() {

    }
  }
}
</script>

<style>
  .left {
    width: 30%;
    left: 0px;
    float: left;
  }
  .right {
    width: 69%;
    left: 30%;
    right: 0px;
    float: right;
  }
  .line {
    height: 1px;
    background-color: aqua;
    top: 60px;
    position: relative;
    padding-left: 10px;
    padding-right: 10px;
  }
  .commitBtn {
    font-size: 10px;
    color: #8d9090;
    text-align: center;
    margin-top: 8px;
    height: 30px;
    left: 10px;
    width: calc(100% - 20px);
  }
</style>
